package com.settlement.system.service;

import com.settlement.system.common.exception.ServiceException;
import com.settlement.system.mapper.security.userdetails.SysUserDetails;
import com.settlement.system.model.entity.common.SystemUser;
import com.settlement.system.model.entity.common.TblRefundAuditBill;
import com.settlement.system.model.entity.common.TblRefundAuditBillDtl;

import java.util.List;
import java.util.Map;

/**
 * 退款稽核单据明细表 服务类
 *
 * @author xiaochuan
 * @since 2020-06-24
 */

public interface ITblRefundAuditBillDtlService extends IBaseService {

    /**
     * insertDtl
     *
     * @param bill
     * @param currentDtl
     * @param lastDtl
     * @throws ServiceException
     */
    void insertDtl(TblRefundAuditBill bill, TblRefundAuditBillDtl currentDtl, TblRefundAuditBillDtl lastDtl) throws ServiceException;

    /**
     * updateBillStatus
     *
     * @param user
     * @param billNo
     * @throws ServiceException
     */
    void updateBillStatus(SysUserDetails user, String billNo) throws ServiceException;

    /**
     * selectLastEffective
     *
     * @param params
     * @return
     * @throws ServiceException
     */
    List<TblRefundAuditBillDtl> selectLastEffective(Map<String, Object> params) throws ServiceException;

    /**
     * selectLastSecond
     *
     * @param params
     * @return
     * @throws ServiceException
     */
    List<TblRefundAuditBillDtl> selectLastSecond(Map<String, Object> params) throws ServiceException;

    /**
     * selectRoleStatus
     *
     * @param params
     * @return
     * @throws ServiceException
     */
    List<TblRefundAuditBillDtl> selectRoleStatus(Map<String, Object> params) throws ServiceException;

    /**
     * 批量保存退款稽核单据
     *
     * @param tblRefundAuditBillDtl
     * @return
     * @throws ServiceException
     */
    Map<String, Object> batchSaveRefundCheckDtl(TblRefundAuditBillDtl tblRefundAuditBillDtl) throws ServiceException;
}
